// Level.h provides the attributes of the Level class
//-----------------

#if !defined( LevelH)
#define LevelH

//-----------------
// Includes various libraries and files
#include <cassert>		// for asserts
#include <d3dx9.h>		// Direct 3D library (for all Direct 3D functions)
#include <fstream>		// for reading files
#include <string>
#include <vector>

#include "EndPosition.h"
#include "FileManager.h"
#include "Mesh.h"
#include "Player.h"
#include "WorldObject.h"
//-----------------

class Level {
	public:
		// constructor and destructor
		Level( LPDIRECT3DDEVICE9 device, std::vector<Mesh>* models, Player* player);
		~Level();

		// accessors
		std::string get_module() const;
		int get_current_level() const;

		// mutators
		void set_module( std::string m);
		void set_current_level( int l);

		void collision( const Player* p_player, int& state);
		void render_perspective();

		void reset();

	private:
		void extract_current_level();

		void delete_objects();

		LPDIRECT3DDEVICE9 device_;
		Player* p_player_;
		std::vector<Mesh>* p_models_;
		FileManager fm_;
		
		std::vector<WorldObject*> objects_;
		WorldObject skybox_;
		std::vector<AudioAsset*> sounds_;			// placeholder until audio is implemented properly
		std::vector<EndPosition> end_positions_;	// doesn't need to be a pointer as EndPosition doesn't inherit from another class

		std::string module_;
		int level_current_, level_total_;
};

#endif